package com.paw.qrcode.service.impl;

import com.paw.qrcode.service.IPawWxService;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
import org.springframework.stereotype.Service;

/**
 * @author lvzihai
 * @date 2022/6/22
 **/
@Service
public class PawWxServiceImpl implements IPawWxService {

  @Override
  public WxMpService getMpService () {
    WxMpDefaultConfigImpl wxMpConfigStorage = new WxMpDefaultConfigImpl();
    wxMpConfigStorage.setAppId("wx9fe291deab935576");
    wxMpConfigStorage.setSecret("9646b4f36c60071e5ebc2fb2753f2c69");

    WxMpService wxMpService = new WxMpServiceImpl();
    wxMpService.setWxMpConfigStorage(wxMpConfigStorage);

    return wxMpService;
  }
}
